package com.news.servlet;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Servlet implementation class loginOutServlet
 */
@WebServlet("/loginOutServlet")
public class LoginOutServlet extends HttpServlet {
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		request.getSession().invalidate();
		//在父页面打开新页面
		response.getWriter().print("<script language=javascript>window.parent.location.href='/NewsPubSys/jsp/login.jsp'</script>");
		//response.sendRedirect("/NewsPubSys/showNews");

	}

}
